package com.bbs.service.impl;

import com.bbs.dao.TopicDao;
import com.bbs.dao.UserDao;
import com.bbs.entity.Topic;
import com.bbs.entity.User;
import com.bbs.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
@Component("topicService")
public class TopicServiceImpl implements TopicService {
    @Autowired
    private TopicDao topicDao;
    @Override
    public List<Topic> listTopic() {
        List<Topic> topicList = new ArrayList<>();
        topicList = topicDao.listTopicByHot();
        return topicList;
    }
}
